package com.sun.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author SunRui
 * @description Controller类
 * @date 2024/9/29 8:54
 */
@Controller
@RequestMapping("User")
public class UserController {

    @ResponseBody
    @RequestMapping("say")
    public String sayHello(){
        System.out.println("你好,SpringMvc !!!");
        return " 你好,SpringMvc !!!";
    }
    @ResponseBody
    @RequestMapping("say2")
    public String sayHello2(){
        System.out.println("你好,Hello.jsp !!!");
        return "Hello.jsp";
    }
}